<?php
	class Admin extends CI_Controller
    {
        public function __construct() {
            parent::__construct();
            $this->load->helper('url');
            $this->load->library('checkuser');
            $this->checkuser->CheckUserLogin();            
        }

        public function index()
        {   
            $this->loadView();
        }  
        
        public function loadView()
        {
            $temp['title'] = 'Nha khoa Toàn Mỹ - Admin Control Panel';            
            $temp['data'] = "";     
            $temp['template'] = 'admin/index';
            $this->load->view('admin/template/layout', $temp);
        }
        
        private function checkLogin()
        {
            $validated = $this->session->userdata('validated'); 
            echo $validated;
            if(!$validated)
                redirect('login/adminlogin');
        }
        
       
        
       
    }
?>